
#defualt fio 
runtime=120
iodepth=128
numjobs=1
size=100G
bs=4k
rw=randwrite
dev=/dev/vdc

fio_cmd="fio --output-format=json -name=iops  -bs=$bs -rw=$rw -runtime=$runtime -iodepth=$iodepth -numjobs=$numjobs -filename=$dev -ioengine=libaio -direct=1 -group_reporting -size=$size"

run_test(){
    # 执行FIO测试并捕获退出码
    if python3 ./fio_simple.py \
     --fio-command "$fio_cmd"  \
     --nodes $nodes --count 3 --wait-time 20 ; then
        echo "测试 $i 成功完成，退出码: $?"
    else
        echo "测试 $i 失败，退出码: $?"
        exit 1
    fi
}

#混闪
dev=/dev/vdc  ##磁盘


###分离
nodes="192.166.213.240 192.166.213.241 192.166.213.242"
bs=4k
rw=randwrite
run_test

###融合部署 
nodes="192.166.201.158 192.166.201.160 192.166.201.161"
bs=4k
rw=randwrite
run_test